package com.web;


import com.pojo.dto.Message;
import com.pojo.vo.SelectVo;
import com.service.SysUtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 所有下拉框列表查询的信息
 */
@RestController
public class SysUtilController {
    @Autowired
    SysUtilService sysUtilService;

    @GetMapping("/select/sex")
    public Message<List<SelectVo>> selectsex(Long id) {
        return sysUtilService.select(id, "user_sex");
    }

    @GetMapping("/select/state")
    public Message<List<SelectVo>> selectstate(Long id) {
        return sysUtilService.select(id, "user_state");
    }

    @GetMapping("/select/type")
    public Message<List<SelectVo>> selecttype(Long id) {
        return sysUtilService.select(id, "sys_type");
    }

    @GetMapping("/select/userInfo/type")
    public Message<List<SelectVo>> selectUserInfoType(Long id) {
        return sysUtilService.select(id, "user_info_type");
    }
}
